<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var shu1 = prompt('输入第一个数');
        var shu2 = prompt('输入第二个数');
        // 强制转换为数字型
        var jieGuo = parseInt(shu1)+parseInt(shu2);
        alert(jieGuo);
        alert(parseInt(shu1)+parseInt(shu2));
    </script>
</head>
<body>
    
</body>
</html>